package com.ms.service.module.account.accountloginblocker.db;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.xpec.c4.db.model.log.basic.BasicLogModel;


@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
@Table(name = AccountLoginIPBlockLogModel.TABLE_NAME)
@org.hibernate.annotations.Table(
		appliesTo = AccountLoginIPBlockLogModel.TABLE_NAME, 
		indexes = { 
				@org.hibernate.annotations.Index(name = "IDX_ACCOUNT_IP", columnNames = { "ip" }) ,
				@org.hibernate.annotations.Index(name = "IDX_ACCOUNT_ID", columnNames = { "accountId" }) 
				})
public class AccountLoginIPBlockLogModel extends BasicLogModel{

	private static final long serialVersionUID = 8245278371402958316L;

	public static final String TABLE_NAME = "account_login_ip_block_log";
	
	/**
	 * IP
	 */
	private String ip;

	/**
	 * 帳號ID
	 */
	private String accountId;

	/**
	 * 鎖定時的登錄歷程 (秒)
	 */
	private String loginTimes;

	/**
	 * 鎖定時間 (秒)
	 */
	private long lockTime;

	/**
	 * 解鎖時間 (秒)
	 */
	private long unLockTime;

	/**
	 * 狀態 : </br> 
	 * 0 : 封鎖 </br> 
	 * 1 : GM 解除封鎖 </br>
	 */
	private int lockStatus;
	
	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getAccountId() {
		return accountId;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	@Column(columnDefinition="VARCHAR(1024) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL")
	public String getLoginTimes() {
		return loginTimes;
	}

	public void setLoginTimes(String loginTimes) {
		this.loginTimes = loginTimes;
	}

	public long getLockTime() {
		return lockTime;
	}

	public void setLockTime(long lockTime) {
		this.lockTime = lockTime;
	}

	public long getUnLockTime() {
		return unLockTime;
	}

	public void setUnLockTime(long unLockTime) {
		this.unLockTime = unLockTime;
	}

	public int getLockStatus() {
		return lockStatus;
	}

	public void setLockStatus(int lockStatus) {
		this.lockStatus = lockStatus;
	}
}
